import request from '@/utils/request'

// 创建订单快递信息
export function createOrderExpressInfo(data) {
  return request({
    url: '/system/order-express-info/create',
    method: 'post',
    data: data
  })
}

// 更新订单快递信息
export function updateOrderExpressInfo(data) {
  return request({
    url: '/system/order-express-info/update',
    method: 'put',
    data: data
  })
}

// 删除订单快递信息
export function deleteOrderExpressInfo(id) {
  return request({
    url: '/system/order-express-info/delete?id=' + id,
    method: 'delete'
  })
}

// 获得订单快递信息
export function getOrderExpressInfo(id) {
  return request({
    url: '/system/order-express-info/get?id=' + id,
    method: 'get'
  })
}

// 获得订单快递信息分页
export function getOrderExpressInfoPage(params) {
  return request({
    url: '/system/order-express-info/page',
    method: 'get',
    params
  })
}
// 导出订单快递信息 Excel
export function exportOrderExpressInfoExcel(params) {
  return request({
    url: '/system/order-express-info/export-excel',
    method: 'get',
    params,
    // responseType: 'blob'
  })
}

// 确认入库
export function confirmTake(id) {
  return request({
    url: '/system/order-express-info/confirmTake?id=' + id,
    method: 'get'
  })
}

// 退回物流
export function refundTake(data) {
  return request({
    url: '/system/order-express-info/refundTake',
    method: 'post',
    data: data
  })
}

// 物流信息
export function logisticsInfo(id) {
  return request({
    url: '/system/order-express-info/logisticsInfo?id=' + id,
    method: 'get'
  })
}

// 批量确认入库
export function batchConfirmTake(expressNos) {
  return request({
    url: '/system/order-express-info/batchConfirmTake',
    method: 'post',
    data: expressNos
  })
}



